package com.imooc.util;

/**
 * @author liuhuan
 * @date 2018/7/21 10:54
 * @description
 */
public class MathUtil {
    public static final double RANGE_MONEY=0.01;

    /**
     * 比较两个金额是否相等
     * @param d1
     * @param d2
     * @return
     */
    public static boolean equal(Double d1, Double d2){
        Double result=Math.abs(d1-d2);

        return result<RANGE_MONEY;
    }
}
